# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=totem
pkgver=3.34.1
pkgrel=5
pkgdesc="Movie player for the GNOME desktop"
url="https://wiki.gnome.org/Apps/Videos"
arch="all !s390x" # grilo-plugins missing
license="GPL-2.0-or-later"
depends="gsettings-desktop-schemas gst-plugins-good grilo-plugins"
makedepends="meson glib-dev gtk+3.0-dev gstreamer-dev libpeas-dev totem-pl-parser-dev
	gobject-introspection-dev clutter-gtk-dev py3-gobject3-dev grilo-dev
	gnome-desktop-dev vala gsettings-desktop-schemas-dev gst-plugins-base-dev
	libxml2-dev gstreamer-tools clutter-gst-dev itstool"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/totem/${pkgver%.*}/totem-$pkgver.tar.xz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	xvfb-run ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="9a3556f5cf522fca29926db185c2e5d25bdb80a25e14d0ba3062a7f15fc3ec40ae9f25752763bc444d4fd82ec2098efd732da662a1b1c5923ec19fde432606db  totem-3.34.1.tar.xz"
